package com.ytjj.bigdata.service;

import com.ytjj.bigdata.dao.AdsTopicDao;
import com.ytjj.bigdata.model.response.AdsTopicResponse;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdsTopicService {
    @Resource
    private AdsTopicDao adsTopicDao;

    /**
     * 根据话题Id获得话题pv数
     * @returns: com.ytjj.qmyx.admin.model.db2.AdsTopicResponse
     * 
     */
    public AdsTopicResponse getTotalById(Integer id) {
        return adsTopicDao.getTotalById(id);
    }

    /**
     * 根据话题Id获得今日话题pv
     * @returns: com.ytjj.qmyx.admin.model.db2.AdsTopicResponse
     * 
     */
    public AdsTopicResponse getTodayPv(Integer id) {
        return adsTopicDao.getTodayPv(id);
    }

    /**
     * 获得所有话题的pv总量
     * @param :
     * @returns: java.util.List<com.ytjj.qmyx.admin.model.db2.AdsTopicResponse>
     * 
     */

    public List<AdsTopicResponse> getTopicsTop() {
        return adsTopicDao.getTopicsTop();
    }

    public AdsTopicResponse getTopicInfoAndPvById(Integer id){
        AdsTopicResponse topicsPvById = adsTopicDao.getTopicsPvById(id);
        return topicsPvById;
    }
}
